package me.sdevil507.systemAssist.systemMessage.po;

import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.sdevil507.supports.jpa.BaseJpaSnowflakeIdEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 通知内容表
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "system_message_text")
public class SystemMessageTextPo extends BaseJpaSnowflakeIdEntity {

    /**
     * 通知标题
     */
    @Column
    private String messageTitle;

    /**
     * 通知内容
     */
    @Column
    private String messageContent;

    /**
     * 通知关联业务主键
     */
    @Column
    private Long relationId;

    /**
     * 是否删除
     */
    @Column(nullable = false)
    private Boolean  isDel= false;

    /**
     * 创建时间
     */
    @Column
    private Date createTime = new Date();

    public SystemMessageTextPo() {
    }

    public SystemMessageTextPo(String messageTitle, String messageContent, Long relationId) {
        this.messageTitle = messageTitle;
        this.messageContent = messageContent;
        this.relationId = relationId;
    }
}
